<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
	<title>Ingreso Deporte</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="stylesheet" type="text/css" href="../css/ingresos.css" />
</head>
<script type="text/javascript">
    function valores(){

        var input1 =document.getElementById("txTexto1");
        var input2 =document.getElementById("txTexto2");
        var table = document.createElement("table");
	var tr = document.createElement("tr");
	var td1 = document.createElement("td");
	var td2 = document.createElement("td");
        var td3 = document.createElement("td");
        var td4 = document.createElement("td");
        
	
        td1.innerHTML = input1.value;
        td2.innerHTML = input2.value;
        td3.innerHTML = "Robinson Macias";
        td4.innerHTML = "Carlos Cerezo";
            
	tr.appendChild(td1);
	tr.appendChild(td2);
        tr.appendChild(td3);
        tr.appendChild(td4);
	table.appendChild(tr); 
	
	document.getElementById('tabla').appendChild(table);
        input1.value="";
        input2.value="";
    }
     
        function resolucion(valor,valor2) {
          var w = screen.width;
          var h = screen.height;
          var cx = screen.width/2;
          var cy = screen.height/2;

          w = w * valor;
          h = h * valor2;

          cx -= w/2;
          cy -= h/2;

          window.resizeTo(w, h);
          window.moveTo(cx, cy)
          self.focus();
         }

 
</script>
<body onload="resolucion(0.60,0.75);">
    <div>
        <div id="titleheader"><h1>Ingreso Resultado Final</h1></div>
         <div id ="div1">
        <form action="funciones/controlador.php" method="post">
            <div class="sub1">
                <div class="campos">Puntaje Ganador:</div>
                <input id="txTexto1" type="text" name="puntajeganador"/>
            </div>
            
            <div class="sub1">
                <div class="campos">Puntaje Perdedor:</div>
                <input id="txTexto2" type="text" name="puntajeperdedor"/>
            </div>
            
            <div class="sub1">
                <div class="campos">Jugador Ganador:</div>
                <select name="jugador1">
                    <?php
                include_once '../Clases/conexion.php';
                $con = new conexion();
                $con->conectar();
                 $result = mysql_query("SELECT * FROM jugador");
                  while($row = mysql_fetch_array($result)){

                echo '<option value="'.$row["id_jugador"].'">'.$row["nombres"].'</option>';

                 }
                 ?>
                </select>
            </div>
            <!--Ingresar Ganador 2:<br/>
            <select name="jugador2">
            
            <?php
            include_once '../Clases/conexion.php';
            $con = new conexion();
            $con->conectar();
             $result = mysql_query("SELECT * FROM jugador");
              while($row = mysql_fetch_array($result)){
           
            echo '<option value="'.$row["id_jugador"].'">'.$row["nombres"].'</option>';
          
             }
             ?>
            </select><br/><br/>-->
            <div class="sub1">
                <div class="campos">Jugador Perdedor:</div>
                <select name="jugador3">
                    <?php
                include_once '../Clases/conexion.php';
                $con = new conexion();
                $con->conectar();
                 $result = mysql_query("SELECT * FROM jugador");
                  while($row = mysql_fetch_array($result)){

                echo '<option value="'.$row["id_jugador"].'">'.$row["nombres"].'</option>';

                 }
                 ?>
                </select>
            </div>
            <!--Ingresar Ganador 4:<br/>
            <select name="jugador4">
                <?php
            include_once '../Clases/conexion.php';
            $con = new conexion();
            $con->conectar();
             $result = mysql_query("SELECT * FROM jugador");
              while($row = mysql_fetch_array($result)){
           
            echo '<option value="'.$row["id_jugador"].'">'.$row["nombres"].'</option>';
          
             }
             ?>
            </select><br/><br/>-->
            
            <div id="tabla">
             
            </div>
            
            <input type="submit"  value="Ingresar"/>
            <input type="hidden" name="accion" value="ingresar resultado"/>
            <input type="button" alt="insertar" value="Guardar" onClick="valores()" />
        </form>
             </div>
    </div>
</body>

</html>

<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>
